package com.cn.wanxi.service;

import com.cn.wanxi.dao.NavDao;
import com.cn.wanxi.model.NavModel;

public class NavService {
    public NavModel[] getNavModels() {
        NavDao navDao = new NavDao();
        int length = navDao.hrefs.length;
        NavModel[] navModels = new NavModel[length];
        for (int i = 0; i < length; i++) {
            NavModel model = new NavModel();
            model.setHref(navDao.hrefs[i]);
            model.setTitle(navDao.titles[i]);
            navModels[i] = model;
        }

        return navModels;
    }

    public static void main(String[] args) {
        new NavService().getNavModels();
    }
}
